From: kfraser@localhost.localdomain Date: Wed, 2 Aug 2006 14:06:29 +0000 (+0100) Subject: [XEN] Allow quick building of individual files. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15754^2~4 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=518e1001737d4bdd2abbc1bc00d7120c6f92af57;p=xen.git [XEN] Allow quick building of individual files. For the purpose of quick compile testing of (namely smaller) changes, provide a means to build individual pieces underneath the xen dir (could equally be applied to tools, and the top level Makefile could also be made aware of this logic to make things even more consistent). At once, add a way to only pre-process files in case some of the more complicated macros need change and hence inspection of the results. Signed-off-by: Jan Beulich --- diff --git a/xen/Makefile b/xen/Makefile index d9f5322eb6..cad1dc1407 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -146,3 +146,15 @@ _cscope: .PHONY: MAP MAP: $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map + +.PHONY: FORCE +FORCE: + +%.o %.i: %.c FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + +%.o %.s: %.S FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + +%/: FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o diff --git a/xen/Rules.mk b/xen/Rules.mk index 17a0eb04aa..15c0af3cc1 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -105,3 +105,9 @@ _clean_%/: FORCE %.o: %.S $(HDRS) Makefile $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@ + +%.i: %.c $(HDRS) Makefile + $(CPP) $(CFLAGS) $< -o $@ + +%.s: %.S $(HDRS) Makefile + $(CPP) $(CFLAGS) $(AFLAGS) $< -o $@